clabel][toclabel][\TOCLabel]
\setupsynonyms[toclabel][textstyle=\sc]
\toclabel{TOCNumberLabel}{Chapter}
\toclabel{TOCTitleLabel}{Title}
\toclabel{TOCPageLabel}{Page}
Then compute the width of the chapter-number and page-number labels
\setwidthof\TOCLabel{TOCNumbe
On 5/22/2020 19:49, Rik Kabel wrote:
If the OP simply wants the width of a string, one can use
\setwidthof#1\to#2.
\define\String{pqrs}
\setwidthof{\String}\to\Wdth
\String\ is \Wdth\ wide.
\setwidthof{{\tfb\em\String}}\to\Wdth
{\tfb\em\String} is \Wdth\ wide.
I do
> On 23 May 2020, at 01:49, Rik Kabel wrote:
>
> If the OP simply wants the width of a string, one can use \setwidthof#1\to#2.
>
> \define\String{pqrs}
> \setwidthof{\String}\to\Wdth
> \String\ is \Wdth\ wide.
>
> \setwidthof{{\tfb\em\String}}\to\Wdth
> {
dozen nodes in a run.
Hans
If the OP simply wants the width of a string, one can use
\setwidthof#1\to#2.
\define\String{pqrs}
\setwidthof{\String}\to\Wdth
\String\ is \Wdth\ wide.
\setwidthof{{\tfb\em\String}}\to\Wdth
{\tfb\em\String} is \Wdth\ wide.
I do not know if that is dif
' of the narrowed paragraph. Also, the
placement of the text in the margin is wrong and not easily controlled
as with \llap and \rlap. The code started out more like:
\define\Mark{\color[middlegray]{\hskip.6cm\itb¿\ }}
\setwidthof{\Mark}\to\MarkWidth
...
\starttexdefinition
and not easily controlled
as with \llap and \rlap. The code started out more like:
\define\Mark{\color[middlegray]{\hskip.6cm\itb¿\ }}
\setwidthof{\Mark}\to\MarkWidth
...
\starttexdefinition stopBufTest
\startluacode
buffers.prepend("TestBuffer","\\dontl
and
\rlap. The code started out more like:
\define\Mark{\color[middlegray]{\hskip.6cm\itb¿\ }}
\setwidthof{\Mark}\to\MarkWidth
...
\starttexdefinition stopBufTest
\startluacode
buffers.prepend("TestBuffer","\\dontleavehmode\\llap{\\Mark}"
On 10/11/2015 5:21 AM, Rik Kabel wrote:
The following example works with older versions of ConTeXt, such as the
version from 20150325 in my repository. It fails with TL15 and later,
including the current standalone beta.
% macros=mkvi
\setwidthof {99}\to\IDWidth\relax
\def\STWidth
later,
including the current standalone beta.
% macros=mkvi
\setwidthof {99}\to\IDWidth\relax
\def\STWidth{\dimexpr\textwidth-\IDWidth+1cm}
\definelist[OList]
\setuplist
[OList][criterium=all,alternative=c,pagecommand=\gobbleoneargument]
\starttexdefinition OLister #ID#
On 2015-10-11 06:11, Hans Hagen wrote:
On 10/11/2015 5:21 AM, Rik Kabel wrote:
The following example works with older versions of ConTeXt, such as the
version from 20150325 in my repository. It fails with TL15 and later,
including the current standalone beta.
% macros=mkvi
\setwidthof
The following example works with older versions of ConTeXt, such as the
version from 20150325 in my repository. It fails with TL15 and later,
including the current standalone beta.
% macros=mkvi
\setwidthof {99}\to\IDWidth\relax
\def\STWidth{\dimexpr\textwidth-\IDWidth+1cm
the width of simple things; from Hans on the mailing
%% list http://www.ntg.nl/pipermail/ntg-context/2007/024390.html
%% example usage: \SetWidthOf{\ColContent}\to\ColContentWidth\relax
%% or: \SetWidthOf{Column Content}\to\ContentWidth\relax
\def\SetWidthOf#1\to#2
; from Hans on the mailing
%% list http://www.ntg.nl/pipermail/ntg-context/2007/024390.html
%% example usage: \SetWidthOf{\ColContent}\to\ColContentWidth\relax
%% or: \SetWidthOf{Column Content}\to\ContentWidth\relax
\def\SetWidthOf#1\to#2%
{\bgroup
\setbox\scratchbox
,boffset=.25ex,
frame=off,framecolor=yellow:4,
background=head:line]
\defineheadplacement
[MyPlacement] [vertical]
{\setwidthof{#1\hskip\leftmargindistance}\to\MyWidth\hskip-\MyWidth
\startframedHead
#1\hskip\leftmargindistance #2
\stopframedHead}
\setuphead [chapter,section
be an expandable variant (proper
typeset but the string must be utf characters only)
\starttext
\setwidthof{Robin Kirkham}\to\whatever
\whatever=\widthofstring{Robin Kirkham}
\stoptext
. It was originally
\setwidthof#1\to#2, which—in English at least—sounds somewhat ambiguous with
regard to which variable is providing a width.
\def\TitlePage#1#2%
{
\givewidthof{\scc #2}\to\SubtitleWidth
\newdimen\TitlePageVar
\TitlePageVar=\dimexpr(\textwidth-\SubtitleWidth)
\dontleavehmode\vfill
Hi all,
foo = bar
| baz
it seems I found some sort of a solution. Using the \setwidthof I found at
[1], I wrote the following:
\def\setwidthof#1\to#2%
{\bgroup
\setbox\scratchbox\hbox{#1}%
\expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}
foo = bar
\setwidthof{foo
.
\definesynonyms[nomenclature][nomenclatures][\infull]
\setupsynonyms[nomenclature][criterium=all,width=broad]
\nomenclature[a]{a}{This is the letter a}
\nomenclature[b]{abcdefghijklmnopqrstuvwxyz}{This is the alphabet}
\nomenclature[c]{c}{This is the letter c}
\def\setwidthof#1\to#2%
{\bgroup
\setbox
Right, that works for this example, but if I change what nomenclatures
are in the list then I would have to go in and manually change the
setwidthof{} command. Am I correct in thinking that? I guess ideally
I wouldn't have to go in and change the spacing manually every time I
update my
://archive.contextgarden.net/message/20070314.120612.adab0a8b.en.html
\def\setwidthof#1\to#2%
{\bgroup
\setbox\scratchbox\hbox{#1}%
\expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}
\setwidthof{{\it Wednesday, January 28.\hskip 1em}}\to\longestdate
%% Definitions
\def\ClassDate#1{\item \inframed
}},
...]
\def\setwidthof#1\to#2%
{\bgroup
\setbox\scratchbox\hbox{#1}%
\expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}
Thanks Wolfgang, Chen and Hans for your responses. I used Hans'
one ... it seems to work.
I'm actually trying to indent tables of contents by level. I want
each indent
\stoptext
this will typeset ok, but not with \dimen0=\robinwidth
\def\setwidthof#1\to#2%
{\bgroup
\setbox\scratchbox\hbox{#1}%
\expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}
\starttext
\setwidthof{Robin Kirkham}\to\whatever
\getrawparameters
[robin]
[width=\whatever
22 matches
Mail list logo